package com.wpre.vampiremq.common;

/**
 * Created with IntelliJ IDEA.
 * Description:一个消费者完整的执行环境
 * User: LianBao
 * Date: 2025-01-18
 * Time: 16:13
 */
public class ConsumerEnv {
    private String consumerTag;//消费者身份标识
    private String queueName;//队列名
    private boolean autoAck;//是否是确认应答
    private Consumer consumer;//回调函数,处理收到的消息

    public ConsumerEnv(String consumerTag, Consumer consumer, String queueName, boolean autoAck) {
        this.consumerTag = consumerTag;
        this.consumer = consumer;
        this.queueName = queueName;
        this.autoAck = autoAck;
    }

    public String getConsumerTag() {
        return consumerTag;
    }

    public void setConsumerTag(String consumerTag) {
        this.consumerTag = consumerTag;
    }

    public boolean isAutoAck() {
        return autoAck;
    }

    public void setAutoAck(boolean autoAck) {
        this.autoAck = autoAck;
    }

    public Consumer getConsumer() {
        return consumer;
    }

    public void setConsumer(Consumer consumer) {
        this.consumer = consumer;
    }

    public String getQueueName() {
        return queueName;
    }

    public void setQueueName(String queueName) {
        this.queueName = queueName;
    }
}
